package org.bing.flex.action {
    import org.bing.flex.helper.PageUrlHelper;

    public class GeneralAction {

        public function invoke(method:String, args:Array=null, onResult:Function=null, onFault:Function=null):void {

        }

        public function url():String {
            var url:String=PageUrlHelper.getPageUrl();
            // srv: http://www.xengine.com/context/AMF/*
            // swf: http://www.xengine.com/context/RIA/*
            var pos:int=url.lastIndexOf("/RIA/");
            if (pos > 0) {
                url=url.substring(0, pos) + "/hessian";
            } else {
                url="http://localhost:8080/hessian/"; // For local testing
            }
            return url;
        }
    }
}